package com.iran.visitor;

import java.util.ArrayList;

public class MainTest {
    public static void main(String[] args) {
        ObjectStructure objectStructure = new ObjectStructure();
        objectStructure.add(new ConcreteElementA());
        objectStructure.add(new ConcreteElementB());

        ConcreteVisitor1 c1 = new ConcreteVisitor1();
        ConcreteVisitor2 c2 = new ConcreteVisitor2();

        objectStructure.accept(c1);
        objectStructure.accept(c2);


    }
}
